package com.hxzy.controller;


import com.hxzy.common.annon.RepeatSubmit;
import com.hxzy.common.vo.R;
import com.hxzy.common.web.controller.BaseController;
import com.hxzy.service.SysOperLogService;
import com.hxzy.system.entity.SysDictType;
import com.hxzy.system.entity.SysOperLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "操作日志记录API")
@RequestMapping("/log")
@RestController
public class SysOperLogController extends BaseController {

    @Autowired
    private SysOperLogService sysOperLogService;


    // @PreAuthorize(value = "@ss.hasAuthority('system:dict:add')")
    @ApiOperation(value = "新增日志")
    @PostMapping
    public R add(@RequestBody @Validated SysOperLog sysOperLog)  {
        boolean result = this.sysOperLogService.save(sysOperLog);
        return  super.toR(result);
    }



}
